package study;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import study.service.Music;
import study.service.OderService;
import study.service.Player;
import study.service.UserService;

/**
 * 日志级别从高到低排序 ERROR WARN INFO DEBUG
 */
public class SpringXmlApplication {
    public static void main(String[] args) {
        Log log = LogFactory.getLog(SpringXmlApplication.class);
        ApplicationContext context=new ClassPathXmlApplicationContext("SpringXmlConfig.xml");
//        OderService oder = context.getBean(OderService.class);
//        UserService userService = context.getBean(UserService.class);
//        userService.setOderService(oder);
//        oder.getOder();
        System.out.println("=================================");
        Music music = context.getBean(Music.class);
        music.play();
//        Player player=context.getBean(Player.class);
//        player.play();
    }
}
